"""
users应用的子路由模块
"""


# 路由表（即使子应用没有任何路径映射，这个表必须存在）
from django.urls import re_path,include,path
from . import views

urlpatterns = [
    # 用户名是否重复
    # re_path(r'^usernames/(?P<username>[a-zA-Z0-9_]{5,20})/count/$', views.UsernameCountView.as_view()),
    path('usernames/<username:username>/count/', views.UsernameCountView.as_view()),
    path('mobiles/<mobile:mobile>/count/', views.MobileCountView.as_view()),
    # path('register/', views.RegisterView.as_view()),
    re_path(r'^register/$', views.RegisterView.as_view()),
    path('login/', views.LoginView.as_view()),
    re_path(r'^logout/$', views.LogoutView.as_view()),

    # 用户中心页
    re_path(r'^info/$', views.UserInfoView.as_view()),
    # path('emails/', )
]
